<template>
  <div>
    <el-row :gutter="15">
      <el-col :span="14">
        <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px">
          <el-col :span="14">
            <el-form-item label="uniqueCode" prop="uniqueCode">
              <el-input v-model="formData.uniqueCode" placeholder="uniqueCode" clearable
                prefix-icon="el-icon-user-solid" :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="institutionName" prop="institutionName">
              <el-input v-model="formData.institutionName" placeholder="请输入institutionName" clearable prefix-icon="el-icon-s-shop"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="secondName" prop="secondName">
              <el-input v-model="formData.secondName" placeholder="请输入secondName" clearable prefix-icon="el-icon-phone"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="regionName" prop="regionName">
              <el-input v-model="formData.regionName" placeholder="regionName" clearable prefix-icon="el-icon-eleme"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="check" prop="check">
              <el-input v-model="formData.check" placeholder="请输入check"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalChargerepresentative" prop="medicalChargerepresentative">
              <el-input v-model="formData.medicalChargerepresentative" placeholder="请输入medicalChargerepresentative"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalLegalIdCard" prop="medicalLegalIdCard">
              <el-input v-model="formData.medicalLegalIdCard" placeholder="请输入medicalLegalIdCard"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="minkeMedicalId" prop="minkeMedicalId">
              <el-input v-model="formData.minkeMedicalId" placeholder="请输入minkeMedicalId"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalLevel" prop="medicalLevel">
              <el-input v-model="formData.medicalLevel" placeholder="请输入medicalLevel int"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalChargeIdCard" prop="medicalChargeIdCard">
              <el-input v-model="formData.medicalChargeIdCard" placeholder="请输入medicalChargeIdCard"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalOwnership" prop="medicalOwnership">
              <el-input v-model="formData.medicalOwnership" placeholder="请输入medicalOwnership"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalMoneyregistered" prop="medicalMoneyregistered">
              <el-input v-model="formData.medicalMoneyregistered" placeholder="请输入medicalMoneyregistered"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalCategory" prop="medicalCategory">
              <el-input v-model="formData.medicalCategory" placeholder="请输入medicalCategory"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalRankname" prop="medicalRankname">
              <el-input v-model="formData.medicalRankname" placeholder="请输入medicalRankname"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalNaturebusiness" prop="medicalNaturebusiness">
              <el-input v-model="formData.medicalNaturebusiness" placeholder="请输入medicalNaturebusiness"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalRelationship" prop="medicalRelationship">
              <el-input v-model="formData.medicalRelationship" placeholder="请输入medicalRelationship"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalLegalrepresentative" prop="medicalLegalrepresentative">
              <el-input v-model="formData.medicalLegalrepresentative" placeholder="请输入medicalLegalrepresentative"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="temp" prop="temp">
              <el-input v-model="formData.temp" placeholder="请输入temp"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalLegalAge" prop="medicalLegalAge">
              <el-input v-model="formData.medicalLegalAge" placeholder="请输入medicalLegalAge"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="medicalChargeAge" prop="medicalChargeAge">
              <el-input v-model="formData.medicalChargeAge" placeholder="请输入medicalChargeAge"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="14">
            <el-form-item label="registerNumber" prop="registerNumber">
              <el-input v-model="formData.registerNumber" placeholder="请输入registerNumber"
                :style="{ width: '30%' }"></el-input>
            </el-form-item>
            </el-col>
          <el-col :span="24">
            <el-form-item size="large">
              <el-button type="primary" @click="submitForm">提交</el-button>
              <el-button @click="resetForm">重置</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { addOrderHos } from "@/api/his/testHD";
export default {
  data() {
    return {
      formData: {
        uniqueCode: 1231,
        institutionName: '卫生所',
        secondName: '小卫生所',
        regionCode: '111111',
        regionName: 'asdfasd',
        checked: 1,
        nextCheckData: '2024/10/10',
        busStatus: '0',
        minkeMedicalId: '111',
        medicalLevel: '机构级别',
        medicalChargerepresentative: '主要负责人',
        medicalLegalIdCard: '法人证件号',
        medicalChargeIdCard: '负责人证件号',
        medicalOwnership: '所有制形式',
        medicalMoneyregistered: '注册资金',
        medicalCategory: '机构类别',
        medicalRankname: '机构等次',
        medicalNaturebusiness: '经营性质',
        medicalRelationship: '隶属关系',
        medicalLegalrepresentative: '法定代表人',
        temp: 1,
        medicalLegalAge: 13,
        medicalChargeAge: 18,
        registerNumber: '11111111111111',
      },
      rules: {

      },
    };
  },
  methods: {
    submitForm() {
      this.$refs['elForm'].validate(valid => {
        if (valid) {
          addOrderHos(this.formData)
            .then(response => {
              this.$message({ type: 'success', message: '申请成功!' });

            })
            .catch(error => {
              this.$message.error('提交失败，请重试！');
            });
        }
      });
    },
    resetForm() {
      this.formData = {
        hospitalId: '',
        name: '',
        shortName: '',
        busAddr: '',
        applyEndDate: '',
        nextCheckData: '',
        creditCode: '',
        specialtiesCode: '',
        region: '',
        registerNumber: '',
      };
    },
  },
};
</script>

<style>
/* 样式可以根据需要添加 */
</style>
